import { menuUpdateSchema } from "~/validators/menu";
export default defineEventHandler(async (event) => {
  const result = await runValidate(menuUpdateSchema, event);

  const newData = MenuSchema.findByIdAndUpdate(result.data._id, result.data, {
    new: true,
  });
  return newData;
});
